package com.yuan.spring.messagequeue.redisqueue;

import com.yuan.spring.messagequeue.redisqueue.newimpl.RedisListen;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;

/**
 * redis生产消费模式不建议使用
 * 生产消费模式需要自己控制实现 但是容易产生 烂听
 */
@Component
public class RedisReceiver {
    private static final Logger logger = LoggerFactory.getLogger(RedisReceiver.class);

    @RedisListen("chat*")
    public void receiveMessage2(String message) {
        logger.info("【消费者2】");
    }
}
